﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="view.aspx.cs" Inherits="manager_taskexec_view" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>发布任务</title> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <section class="content-header">
        <h1>任务相关
            <small>任务详情</small>
        </h1>
        <ol class="breadcrumb">
            <li><a><i class="fa fa-dashboard"></i>主页</a></li>
            <li><a href="userManager.aspx">任务相关</a></li>
            <li class="active">任务详情</li>
        </ol>
    </section>

    <section class="content">
        <div class="box box-primary">
            <div class="box-body">
                <table class="table table-bordered">
                    <tr>
                        <td style="vertical-align: middle">任务标题</td>
                        <td>
                            <input type="text" id="txt_title" class="form-control" runat="server" readonly="true" /></td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle">任务描述</td>
                        <td>
                            <textarea class="form-control" style="height: 70px;" id="txt_detail" runat="server" readonly="readonly"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle">结束日期</td>
                        <td>
                            <input type="text" id="txt_rq_yjs" class="form-control" runat="server" readonly="true" />
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle">考核部门</td>
                        <td>
                            <input type="text" id="Bm_Kh_mc" class="form-control" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle">被考核部门</td>
                        <td>
                            <input type="text" id="Bm_Bkh_mc" class="form-control" runat="server" />
                        </td>
                    </tr>
                    <tr style="background-color: tomato">
                        <td colspan="2" style="text-align: center; color:yellow"><b>↓↓↓以下内容需要任务考核人填写。如果任务验收不合格，请务必填写原因。↓↓↓</b></td>
                    </tr>
                    <tr id="in_1">
                        <td style="vertical-align: middle; background-color: indianred">参考值</td>
                        <td>
                            <input type="text" id="txt_Tdata" class="form-control" runat="server" readonly="true" />
                        </td>
                    </tr>
                    <tr id="in_2">
                        <td style="vertical-align: middle; background-color: indianred">填入数据</td>
                        <td>
                            <input type="text" id="txt_Pdata" class="form-control" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="col-sm-2" style="background-color: #93f3f0">是否完美完成</td>
                        <td>
                            <asp:DropDownList ID="ddl_task_state" CssClass="form-control" runat="server">
                                <asp:ListItem Value="1">完美完成任务</asp:ListItem>
                                <asp:ListItem Value="0">未能完成任务</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: middle; background-color: #93f3f0">完成备注</td>
                        <td>
                            <textarea class="form-control" style="height: 70px;" id="txt_bz_js" placeholder="如果任务验收不合格，请务必填写原因。否则被考核人询问未完成原因无法明确解释。" runat="server"></textarea>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="box-footer">
                <a href="Default.aspx" class="btn btn-warning">返回</a>
                <asp:Button ID="Button2" runat="server" class="btn btn-primary pull-right" Text="完成任务" OnClientClick="return FinshTask()" OnClick="Button2_Click" />
            </div>
        </div>
        <div style="display: none;">
            <input type="text" id="Edit_Id" runat="server" value="0" />
            <input type="text" id="isdata" runat="server" value="0" />

        </div>
    </section>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="Server">
    <script>
        IsData();
        function FinshTask() {

            var isdata = $("#ContentPlaceHolder_isdata").val();
            var tdata = $("#ContentPlaceHolder_txt_Pdata").val();

            if (isdata == "1" && tdata == "") {
                alert("此任务需要填写数据，请将数据录入.");
                return false;
            }

            var isRe = confirm("任务提交完成后无法撤销！\n\n您确认要提交完成此任务吗？");
            return isRe;


        }
        function IsData() {
            var isdata = $("#ContentPlaceHolder_isdata").val();
            if (isdata == "0") {
                document.getElementById("in_1").style.display = "none";
                document.getElementById("in_2").style.display = "none";
            }
        }

    </script>

</asp:Content>

